package com.yxzz.core.service.impl;

import com.yxzz.core.domain.PMedicinalRecord;
import com.yxzz.core.mapper.PMedicinalRecordMapper;
import com.yxzz.core.service.IPMedicinalRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 中医用药记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-28
 */
@Service
public class PMedicinalRecordServiceImpl implements IPMedicinalRecordService 
{
    @Autowired
    private PMedicinalRecordMapper pMedicinalRecordMapper;

    /**
     * 查询中医用药记录
     * 
     * @param id 中医用药记录主键
     * @return 中医用药记录
     */
    @Override
    public PMedicinalRecord selectPMedicinalRecordById(Long id)
    {
        return pMedicinalRecordMapper.selectPMedicinalRecordById(id);
    }

    /**
     * 查询中医用药记录列表
     * 
     * @param pMedicinalRecord 中医用药记录
     * @return 中医用药记录
     */
    @Override
    public List<PMedicinalRecord> selectPMedicinalRecordList(PMedicinalRecord pMedicinalRecord)
    {
        return pMedicinalRecordMapper.selectPMedicinalRecordList(pMedicinalRecord);
    }

    /**
     * 新增中医用药记录
     * 
     * @param pMedicinalRecord 中医用药记录
     * @return 结果
     */
    @Override
    public int insertPMedicinalRecord(PMedicinalRecord pMedicinalRecord)
    {
        return pMedicinalRecordMapper.insertPMedicinalRecord(pMedicinalRecord);
    }

    /**
     * 修改中医用药记录
     * 
     * @param pMedicinalRecord 中医用药记录
     * @return 结果
     */
    @Override
    public int updatePMedicinalRecord(PMedicinalRecord pMedicinalRecord)
    {
        return pMedicinalRecordMapper.updatePMedicinalRecord(pMedicinalRecord);
    }

    /**
     * 批量删除中医用药记录
     * 
     * @param ids 需要删除的中医用药记录主键
     * @return 结果
     */
    @Override
    public int deletePMedicinalRecordByIds(Long[] ids)
    {
        return pMedicinalRecordMapper.deletePMedicinalRecordByIds(ids);
    }

    /**
     * 删除中医用药记录信息
     * 
     * @param id 中医用药记录主键
     * @return 结果
     */
    @Override
    public int deletePMedicinalRecordById(Long id)
    {
        return pMedicinalRecordMapper.deletePMedicinalRecordById(id);
    }
}
